Skip to content

Text float over canvas #3

@sjkelly

Description

@sjkelly

First, @rohitvarkey I can't express how great this package is for my work. Hopefully some cool demos will come out of this. Thanks again!

Here I am expecting the text to be in the foreground, but instead it is in the background. The widgets seem unaffected.

screenshot from 2015-09-10 21 09 52

import ThreeJS 

main(window) =  begin
    push!(window.assets,("ThreeJS","threejs"))
    push!(window.assets,"widgets")
    w = Input(1.0)
    h = Input(1.0)
    d = Input(1.0)
    hbox(
        lift(w, h, d) do w, h, d
        ThreeJS.outerdiv() << 
            (ThreeJS.initscene() <<
                [
                    ThreeJS.mesh(0.0, 0.0, 0.0) << 
                    [
                        ThreeJS.sphere(w), ThreeJS.material(Dict(:kind=>"phong",:color=>"red"))
                    ],
                    ThreeJS.pointlight(10.0, 10.0, 10.0),
                    ThreeJS.camera(0.0, 0.0, 10.0)
                ]
            )
        end,
        vbox(
            hbox("width",slider(1.0:5.0) >>> w),
            hbox("height",slider(1.0:5.0) >>> h),
            hbox("depth",slider(1.0:5.0) >>> d),
        )
    ) |> pad(2em)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions