Skip to content

Commit

Permalink
Merge pull request #149 from playcanvas/master
Browse files Browse the repository at this point in the history
m
  • Loading branch information
guycalledfrank committed Dec 16, 2015
2 parents 4d16de6 + 7f07fe4 commit 506dfb8
Show file tree
Hide file tree
Showing 402 changed files with 533 additions and 5,440 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.DS_Store
/build/output
/package.json
/src/graphics/programlib/chunks/generated_shaderchunks.js
/src/graphics/program-lib/chunks/generated-shader-chunks.js
4 changes: 2 additions & 2 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def usage():
print(__doc__)

def concat_shaders():
output = '../src/graphics/programlib/chunks/generated_shaderchunks.js'
dirs = ['../src/graphics/programlib/chunks/']
output = '../src/graphics/program-lib/chunks/generated-shader-chunks.js'
dirs = ['../src/graphics/program-lib/chunks/']

with open(output, 'w') as out:
out.write("// autogenerated at: %s\n" % datetime.datetime.now().strftime("%Y-%m-%d %H:%M"))
Expand Down
324 changes: 163 additions & 161 deletions build/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,162 +1,164 @@
../src/core/core_core.js
../src/core/core_fullscreen.js
../src/core/core_color.js
../src/core/core_guid.js
../src/core/core_time.js
../src/core/core_uri.js
../src/core/core_log.js
../src/core/core_inheritance.js
../src/core/core_bind.js
../src/core/core_path.js
../src/core/core_string.js
../src/core/core_json.js
../src/core/core_cookie.js
../src/core/core_debug.js
../src/core/core_objectpool.js
../src/events/events_events.js
../src/core/core_tags.js
../src/core/core_dom.js
../src/math/math_math.js
../src/math/math_vec2.js
../src/math/math_vec3.js
../src/math/math_vec4.js
../src/math/math_mat3.js
../src/math/math_mat4.js
../src/math/math_quat.js
../src/math/math_curve.js
../src/math/math_curveset.js
../src/shape/shape_boundingbox.js
../src/shape/shape_boundingsphere.js
../src/shape/shape_frustum.js
../src/shape/shape_plane.js
../src/shape/shape_ray.js
../src/graphics/graphics_graphics.js
../src/graphics/graphics_scopeid.js
../src/graphics/graphics_scopespace.js
../src/graphics/graphics_version.js
../src/graphics/graphics_versionedobject.js
../src/graphics/graphics_vertexiterator.js
../src/graphics/graphics_vertexformat.js
../src/graphics/graphics_vertexbuffer.js
../src/graphics/graphics_indexbuffer.js
../src/graphics/graphics_texture.js
../src/graphics/graphics_rendertarget.js
../src/graphics/graphics_shaderinput.js
../src/graphics/graphics_shader.js
../src/graphics/graphics_programlibrary.js
../src/graphics/graphics_device.js
../src/graphics/graphics_chunks.js
../src/graphics/graphics_simpleposteffect.js
../src/graphics/graphics_prefiltercubemap.js
../src/graphics/graphics_paraboloid.js
../src/graphics/programlib/chunks/generated_shaderchunks.js
../src/graphics/programlib/programlib_programlib.js
../src/graphics/programlib/programlib_basic.js
../src/graphics/programlib/programlib_depth.js
../src/graphics/programlib/programlib_depthrgba.js
../src/graphics/programlib/programlib_particle.js
../src/graphics/programlib/programlib_phong.js
../src/graphics/programlib/programlib_pick.js
../src/graphics/programlib/programlib_skybox.js
../src/posteffect/posteffect_posteffect.js
../src/posteffect/posteffect_posteffectqueue.js
../src/scene/scene_scene.js
../src/scene/scene_forwardrenderer.js
../src/scene/scene_graphnode.js
../src/scene/scene_camera.js
../src/scene/scene_light.js
../src/scene/scene_material.js
../src/scene/scene_basicmaterial.js
../src/scene/scene_depthmaterial.js
../src/scene/scene_phongmaterial.js
../src/scene/scene_mesh.js
../src/scene/scene_skin.js
../src/scene/scene_skinpartition.js
../src/scene/scene_model.js
../src/scene/scene_particleemitter.js
../src/scene/scene_pick.js
../src/scene/procedural/scene_procedural.js
../src/anim/anim_animation.js
../src/anim/anim_skeleton.js
../src/audio/audio_audiomanager.js
../src/audio/audio_sound.js
../src/audio/audio_listener.js
../src/audio/audio_channel.js
../src/audio/audio_channel3d.js
../src/input/input_input.js
../src/input/input_mouse.js
../src/input/input_keyboard.js
../src/input/input_gamepads.js
../src/input/input_touch.js
../src/input/input_controller.js
../src/net/net_net.js
../src/net/net_http.js
../src/net/net_oauth.js
../src/net/net_socket.js
../src/script/script_script.js
../src/framework/framework_contentfile.js
../src/framework/framework_pack.js
../src/framework/framework_application.js
../src/framework/framework_stats.js
../src/framework/components/component_registry.js
../src/framework/components/component_system.js
../src/framework/components/component_component.js
../src/framework/components/component_data.js
../src/framework/components/animation/animation_component.js
../src/framework/components/animation/animation_system.js
../src/framework/components/animation/animation_data.js
../src/framework/components/model/model_system.js
../src/framework/components/model/model_component.js
../src/framework/components/model/model_data.js
../src/framework/components/camera/camera_system.js
../src/framework/components/camera/camera_component.js
../src/framework/components/camera/camera_data.js
../src/framework/components/light/light_system.js
../src/framework/components/light/light_component.js
../src/framework/components/light/light_data.js
../src/framework/components/script/script_system.js
../src/framework/components/script/script_component.js
../src/framework/components/script/script_data.js
../src/framework/components/audiosource/audiosource_system.js
../src/framework/components/audiosource/audiosource_component.js
../src/framework/components/audiosource/audiosource_data.js
../src/framework/components/audiolistener/audiolistener_system.js
../src/framework/components/audiolistener/audiolistener_component.js
../src/framework/components/audiolistener/audiolistener_data.js
../src/framework/components/physics/rigidbody_constants.js
../src/framework/components/physics/rigidbody_system.js
../src/framework/components/physics/rigidbody_component.js
../src/framework/components/physics/rigidbody_data.js
../src/framework/components/physics/collision/collision_trigger.js
../src/framework/components/physics/collision/collision_system.js
../src/framework/components/physics/collision/collision_component.js
../src/framework/components/physics/collision/collision_data.js
../src/framework/components/particlesystem/particlesystem_system.js
../src/framework/components/particlesystem/particlesystem_component.js
../src/framework/components/particlesystem/particlesystem_data.js
../src/framework/entity/entity_entity.js
../src/resources/resources_loader.js
../src/resources/resources_animation.js
../src/resources/resources_audio.js
../src/resources/resources_cubemap.js
../src/resources/resources_json.js
../src/resources/resources_material.js
../src/resources/resources_model.js
../src/resources/resources_script.js
../src/resources/resources_text.js
../src/resources/resources_texture.js
../src/resources/resources_html.js
../src/resources/resources_css.js
../src/resources/resources_shader.js
../src/resources/resources_scene.js
../src/resources/resources_hierarchy.js
../src/resources/resources_scenesettings.js
../src/resources/resources_folder.js
../src/resources/parser_jsonmodel.js
../src/resources/parser_scene.js
../src/asset/asset_asset.js
../src/asset/asset_registry.js
../src/core/core.js
../src/polyfill/request-animation-frame.js
../src/polyfill/string.js
../src/polyfill/fullscreen.js
../src/core/color.js
../src/core/guid.js
../src/core/time.js
../src/core/uri.js
../src/core/log.js
../src/core/inheritance.js
../src/core/bind.js
../src/core/path.js
../src/core/string.js
../src/core/json.js
../src/core/cookie.js
../src/core/debug.js
../src/core/events.js
../src/core/tags.js
../src/core/dom.js
../src/core/object-pool.js
../src/math/math.js
../src/math/vec2.js
../src/math/vec3.js
../src/math/vec4.js
../src/math/mat3.js
../src/math/mat4.js
../src/math/quat.js
../src/math/curve.js
../src/math/curve-set.js
../src/shape/bounding-box.js
../src/shape/bounding-sphere.js
../src/shape/frustum.js
../src/shape/plane.js
../src/shape/ray.js
../src/graphics/graphics.js
../src/graphics/scope-id.js
../src/graphics/scope-space.js
../src/graphics/version.js
../src/graphics/versioned-object.js
../src/graphics/vertex-iterator.js
../src/graphics/vertex-format.js
../src/graphics/vertex-buffer.js
../src/graphics/index-buffer.js
../src/graphics/texture.js
../src/graphics/render-target.js
../src/graphics/shader-input.js
../src/graphics/shader.js
../src/graphics/program-library.js
../src/graphics/device.js
../src/graphics/chunks.js
../src/graphics/simple-post-effect.js
../src/graphics/prefilter-cubemap.js
../src/graphics/paraboloid.js
../src/graphics/program-lib/chunks/generated-shader-chunks.js
../src/graphics/program-lib/program-lib.js
../src/graphics/program-lib/basic.js
../src/graphics/program-lib/depth.js
../src/graphics/program-lib/depth-rgba.js
../src/graphics/program-lib/particle.js
../src/graphics/program-lib/phong.js
../src/graphics/program-lib/pick.js
../src/graphics/program-lib/skybox.js
../src/graphics/post-effect.js
../src/scene/scene.js
../src/scene/forward-renderer.js
../src/scene/graph-node.js
../src/scene/camera.js
../src/scene/light.js
../src/scene/material.js
../src/scene/basic-material.js
../src/scene/depth-material.js
../src/scene/phong-material.js
../src/scene/mesh.js
../src/scene/skin.js
../src/scene/skin-partition.js
../src/scene/model.js
../src/scene/particle-emitter.js
../src/scene/pick.js
../src/scene/procedural.js
../src/anim/animation.js
../src/anim/skeleton.js
../src/audio/audio-manager.js
../src/audio/sound.js
../src/audio/listener.js
../src/audio/channel.js
../src/audio/channel3d.js
../src/input/input.js
../src/input/mouse.js
../src/input/keyboard.js
../src/input/game-pads.js
../src/input/touch.js
../src/input/controller.js
../src/net/net.js
../src/net/http.js
../src/net/oauth.js
../src/net/socket.js
../src/framework/script.js
../src/framework/content-file.js
../src/framework/pack.js
../src/framework/application.js
../src/framework/stats.js
../src/framework/components/registry.js
../src/framework/components/system.js
../src/framework/components/component.js
../src/framework/components/data.js
../src/framework/components/animation/component.js
../src/framework/components/animation/system.js
../src/framework/components/animation/data.js
../src/framework/components/model/system.js
../src/framework/components/model/component.js
../src/framework/components/model/data.js
../src/framework/components/camera/system.js
../src/framework/components/camera/component.js
../src/framework/components/camera/data.js
../src/framework/components/camera/post-effect-queue.js
../src/framework/components/light/system.js
../src/framework/components/light/component.js
../src/framework/components/light/data.js
../src/framework/components/script/system.js
../src/framework/components/script/component.js
../src/framework/components/script/data.js
../src/framework/components/audio-source/system.js
../src/framework/components/audio-source/component.js
../src/framework/components/audio-source/data.js
../src/framework/components/audio-listener/system.js
../src/framework/components/audio-listener/component.js
../src/framework/components/audio-listener/data.js
../src/framework/components/rigid-body/constants.js
../src/framework/components/rigid-body/system.js
../src/framework/components/rigid-body/component.js
../src/framework/components/rigid-body/data.js
../src/framework/components/collision/trigger.js
../src/framework/components/collision/system.js
../src/framework/components/collision/component.js
../src/framework/components/collision/data.js
../src/framework/components/particle-system/system.js
../src/framework/components/particle-system/component.js
../src/framework/components/particle-system/data.js
../src/framework/entity.js
../src/resources/loader.js
../src/resources/animation.js
../src/resources/audio.js
../src/resources/cubemap.js
../src/resources/json.js
../src/resources/material.js
../src/resources/model.js
../src/resources/script.js
../src/resources/text.js
../src/resources/texture.js
../src/resources/html.js
../src/resources/css.js
../src/resources/shader.js
../src/resources/scene.js
../src/resources/hierarchy.js
../src/resources/scene-settings.js
../src/resources/folder.js
../src/resources/parser/json-model.js
../src/resources/parser/scene.js
../src/asset/asset.js
../src/asset/asset-registry.js
../contrib/rsvp-3.0.6.min.js
../src/core/core_promise.js
../src/backwards_compatibility.js
../src/scene/scene_immediate.js
../src/core/promise.js
../src/backwards-compatibility.js
../src/scene/immediate.js
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions src/core/core_string.js → src/core/string.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
// String.startsWith polyfill
if (! String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
enumerable: false,
configurable: false,
writable: false,
value: function(str) {
var that = this;
for(var i = 0, ceil = str.length; i < ceil; i++)
if(that[i] !== str[i]) return false;
return true;
}
});
}

// String.endsWith polyfill
if (! String.prototype.endsWith) {
Object.defineProperty(String.prototype, 'endsWith', {
enumerable: false,
configurable: false,
writable: false,
value: function(str) {
var that = this;
for(var i = 0, ceil = str.length; i < ceil; i++)
if (that[i + that.length - ceil] !== str[i])
return false;
return true;
}
});
}

/**
* @namespace
* @name pc.string
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ pc.extend(pc, function () {
this.loader = new pc.ResourceLoader();

this.scene = null;
this.root = new pc.fw.Entity(this);
this.root = new pc.Entity(this);
this.root._enabledInHierarchy = true;
this.assets = new pc.AssetRegistry(this.loader);
this.renderer = new pc.ForwardRenderer(this.graphicsDevice);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ pc.extend(pc, function () {
_resetAspectRatio: function () {
var camera = this.camera;
if (camera) {
if (camera.getRenderTarget()) return;
var device = this.system.app.graphicsDevice;
var rect = this.rect;
var aspect = (device.width * rect.z) / (device.height * rect.w);
Expand Down
File renamed without changes.
Loading

0 comments on commit 506dfb8

Please sign in to comment.