Skip to content

Commit 4a867e3

Browse files
committed
Testing needs_download_network_resources.x3dv on Android, not good -- recorded TODO
1 parent a31a653 commit 4a867e3

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

TODO.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
- Test iOS:
44
- the ability to open custom ZIP, X3D, glTF
55
- can we store pictures in Photo library
6-
- Test Android:
7-
- can we store pictures in Photo library, after permissions change
86
- On Android, it seems we store in "Pictures" folder, not in "Photos" app.
97
- Release on Google Play, AppStore
108
- Animations panel like view3dscene?
@@ -15,8 +13,14 @@
1513
- put on AppStore TestFlight
1614
- implement "Open" command on Android to open media directory
1715
- use standard UI scaling, will make everything always fit
18-
- test "download_urls" on Android
1916
- TransparentBackground in gameviewoptions, gameviewfiles handling is too broad, this also catches clicks in dialog frame e.g. on caption.
17+
- Turntable remove? We never really supported it fully.
18+
- Android:
19+
`Models.Add('Downloading Network (X3D)', 'castle-data:/demo/needs_download_network_resources.x3dv');`
20+
fails - both with and without EnableBlockingDownloads.
21+
It should show model quickly without EnableBlockingDownloads.
22+
With EnableBlockingDownloads, it should be able to show model after download and play sounds.
23+
2024

2125
## Internals
2226

code/gameviewfiles.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ constructor TViewFiles.Create(AOwner: TComponent);
8787
Models.Add('Teapot (fresnel and toon shader) (X3D)', 'castle-data:/demo/teapot_fresnel_toon.x3dv');
8888
Models.Add('Teapot (time to shader) (X3D)', 'castle-data:/demo/teapot_time.x3dv');
8989
Models.Add('Castle Walk (VRML)', 'castle-data:/demo/castle_walk.wrl');
90+
//Models.Add('Downloading Network (X3D)', 'castle-data:/demo/needs_download_network_resources.x3dv');
9091
end;
9192

9293
destructor TViewFiles.Destroy;
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#X3D V4.0 utf8
2+
PROFILE Interchange
3+
4+
# ---------------------------------------------------------------------
5+
# Test file that deliberately relies on browser's ability to download
6+
# remote resources (images, sounds, inline file) over the network.
7+
#
8+
# The related resources are deliberately *not* specified using relative
9+
# paths and *not* embedded in this file -- if the browser does not download
10+
# them, the scene will not render correctly.
11+
# ---------------------------------------------------------------------
12+
13+
Shape {
14+
appearance Appearance {
15+
material Material {
16+
diffuseColor 1 1 1
17+
diffuseTexture ImageTexture {
18+
url "https://github.com/castle-engine/demo-models/blob/master/textures/test_texture.png?raw=true"
19+
}
20+
}
21+
}
22+
geometry Box { }
23+
}
24+
25+
Transform {
26+
translation 0 -2 0
27+
children [
28+
DEF TouchToPlaySound TouchSensor { }
29+
Shape {
30+
appearance Appearance {
31+
material UnlitMaterial {
32+
}
33+
}
34+
geometry Text {
35+
string "Click me to play a sound"
36+
fontStyle FontStyle {
37+
size 0.5
38+
justify "MIDDLE"
39+
}
40+
}
41+
}
42+
DEF SoundToPlay Sound {
43+
source DEF SoundToPlayClip AudioClip {
44+
url "https://github.com/castle-engine/demo-models/raw/master/sound/werewolf_howling.wav"
45+
}
46+
}
47+
]
48+
}
49+
ROUTE TouchToPlaySound.touchTime TO SoundToPlayClip.startTime
50+
51+
Transform {
52+
translation 0 -4 0
53+
scale 0.1 0.1 0.1
54+
children Inline {
55+
# This glTF also refers to more files (textures, bin file with vertex data)
56+
#
57+
# TODO: Fails now, in view3dscene,
58+
# with Access Violation (but works when opened locally).
59+
#url "https://github.com/castle-engine/demo-models/blob/master/castle/castle.gltf?raw=true"
60+
}
61+
}

0 commit comments

Comments
 (0)