Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Another: 3D — Gideros Forum

Another: 3D

dr_maxdr_max Member
edited September 2013 in General questions
See all my code:
also a problem, as I understand it, the new shape creation

P.S. all vertext/virtices export from 3DS

Comments

  • how to remove unwanted objects, lines?
  • ar2rsawseenar2rsawseen Maintainer
    edited September 2013
    The problem is you create a new Shape each time, instead replace the
    local function onEnterFrame(event)
     
    	local t = os.timer()
    	local alpha = math.sin(t/100)
     
    shape = Shape.new() -- This line
    shape:setLineStyle(1, 0xff0000)
    shape:setFillStyle(Shape.SOLID, 0xff8000, 0.8)
    with
    local function onEnterFrame(event)
     
    	local t = os.timer()
    	local alpha = math.sin(t/100)
     
    shape:clear() -- With this line
    shape:setLineStyle(1, 0xff0000)
    shape:setFillStyle(Shape.SOLID, 0xff8000, 0.8)
    And you can also move
    stage:addChild(shape)
    out of the onEnterFrame function, so it get added only once

    And you have yourself an awesome and fast effect ;)

    Likes: dr_max

    +1 -1 (+1 / -0 )Share on Facebook
  • Great!
    Sorry, i not english language. But worked perfectly. (google translate is off)) So soon sorted on visible faces & etc// calculating normals, phong shading )
    YES
  • and now need to determine the visibility Vector3 faces and lighting. Well, sort of faces is also needed.
  • Sorry but I don't understand what you mean by faces?

    @dr_max maybe you will be more comfortable with GLSL language?
    http://blog.giderosmobile.com/post/60754875527/gideros-2-0-0
    Which is available with OpenGL ES 2.0 and shaders in developer preview in Gideros Labs for premium members?
  • Faces? Its indexes to coords of poligons
    to determine the visibility of face to calculate the normal vector, right? if it is negative, then the face is not visible. GLSL this is not necessary. Note that I am only my first experience as a Gideros and in Lua. Thank you!
    And thank you for recuperate in my corner!
  • and ... submitted code - 3d animated. and your example is very good, but it is 2d.
Sign In or Register to comment.