Sha256: 8bc5d13b76a61ba4f3dd73cba90a8afece27b9146918d70a7a00261b8d584721
Contents?: true
Size: 615 Bytes
Versions: 2
Compression:
Stored size: 615 Bytes
Contents
require "js_wrap" require "js_wrap/three/three" # JavaScript ThreeMod = JSWrap::ClassView.wrap(`THREE`) module Three class Three::Object3D < JSWrap::ObjectView js_class `THREE.Object3D` def <<(other) add(other) self end end # A hack for UMD exporting things in globalThis def self.const_missing(name) if ThreeMod.js_property?(name) ThreeMod.js_property(name) elsif JSGlobal.js_property?(name) JSGlobal.js_property(name).js_property(name) else super end end def self.method_missing(*args, &block) ThreeMod.send(*args, &block) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
opal-js_wrap-three-0.1.2 | lib-opal/js_wrap/three.rb |
opal-js_wrap-three-0.1.1 | lib-opal/js_wrap/three.rb |